import {
  Dashboard,
  Login,
  Settings,
  ArticleList,
  ArticleEdit,
  ArticleAdd,
  Notifications,
  UserList,
  UserRole,
  NoAuth,
  Profile,
  NotFound
} from '../views'

export const mainRoutes = [{
  pathname: '/login',
  component: Login
}, {
  pathname: '/404',
  component: NotFound
}]

export const adminRoutes = [{
  pathname: '/admin/dashboard',
  component: Dashboard,
  title: '控制面板',
  icon: 'dashboard',
  isNav: true,
  roles: ['001', '002', '003']
},  {
  pathname: '/admin/article',
  component: ArticleList,
  title: '文章管理',
  icon: 'unordered-list',
  isNav: true,
  exact: true,
  roles: ['001', '002']
}, {
  pathname: '/admin/article/edit/:id',
  component: ArticleEdit,
  roles: ['001', '002', '003']
}, {
  pathname: '/admin/article/add',
  component: ArticleAdd,
  roles: ['002', '002', '003']
}, {
  pathname: '/admin/notifications',
  component: Notifications,
  roles: ['001', '002', '003']
}, {
  pathname: '/admin/noauth',
  component: NoAuth,
  roles: ['001', '002', '003']
}, {
  pathname: '/admin/profile',
  component: Profile,
  roles: ['001', '002', '003']
}, {
  pathname: '/admin/user',
  // component: UserList,
  title: '用户管理',
  icon: 'user',
  isNav: true,
  exact: true,
  children: [
    {
      pathname: '/admin/user',
      component: UserList,
      title: '用户列表',
      icon: 'user',
      isNav: true,
      exact: true,
      roles: ['001', '002', '003']
    },
    {
      pathname: '/admin/role',
      component: UserRole,
      title: '角色列表',
      icon: 'apartment',
      isNav: true,
      exact: true,
      roles: ['001', '002']
    }
  ],
  roles: ['001', '002']
}, {
  pathname: '/admin/settings',
  component: Settings,
  icon: 'setting',
  title: '系统设置',
  isNav: true,
  roles: ['001', '002', '003']
},]